1. Field of the Invention
The present invention relates to the mapping of a first memory address into a second memory address. More particularly, the present invention relates to the mapping of a large BIOS into any system ROM address space, the accessing of an entire flash ROM from a 32K window of the system ROM, and in the case of flash ROMs, the switching of a boot block code section with a BIOS code section in the system ROM address space.
2. The Prior Art
A computer system includes a ROM which is used to hold initial startup code and the System BIOS ROM. The computer may also contain other ROMs on add in cards. When additional ROM add in cards are built onto the system board, they are often combined with the system ROM, since one larger ROM is cheaper to produce than several smaller ones.
ROMS require 16 to 19 address lines, depending upon their size. The CPU memory map is shown in Table 1 as follows:
TABLE 1 ______________________________________ CPU Memory: Size Function ______________________________________ 100000 & above Main memory F0000-FFFFF 64K System ROM E0000-EFFFF 64K System ROM extension D0000-DFFFF 64K Miscellaneous CC000-CFFFF 16K Other ROMS C8000-CBFFF 16K Disk C0000-C7FFF 32K Graphics ROM A0000-BFFFF Video 00000-9FFFF Main Memory ______________________________________
The available address space for the ROMS is a 256K address space from C0000-1M. The memory space F0000-FFFFF is allocated to System ROM. Although the 64K space E0000-EFFFF is allocated as a System ROM extension, the space may be used for other purposes if not used.
The memory spaces above 1M and below C0000 are not available for the ROMs. The memory space above 1M is inaccessible in some modes. The 64K space C0000-CFFFF is preferably left unused in order to allow customers to use this space for programming purposes. From 0 to A is system memory, which is never on the ISA bus.
BIOS
The BIOS serves many functions, both at start-up and after the operating system has taken control of the microprocessor. The BIOS is used for system configuration and IO related functions. An important function of the system BIOS is that it can map in the setup screen, PCI plug and play code, plug and play storage areas, etc.
The prior art merely imposes limitations on where each block can be mapped, limited to the granularity of the size of the block being mapped. To prevent two blocks from accessing the same location in the system memory, a need exists in the prior art for a more versatile means of mapping into the system ROM. Furthermore, a need exists in the prior art for a method of mapping into the system ROM while maintaining a 32K byte granularity.
As the BIOSes provide more functionality, the normal 64K space allocated in ROM is not sufficient. Although expansion is possible, 128K is the limit. A need exists in the prior art for a mapping method which would allow paging of a large BIOS into any ROM address space.
Flash ROM reprogramming
Flash ROMs are a non-volatile form of storage which have recently been used for embedded code storage (e.g., BIOS code). Most importantly, they provide the user with an easy, low-cost method of reprogramming the BIOS and storing system configuration information after the system is in the user's hands.
Windows 95 provides only a 64K byte memory space when it requests that plug-and-play information be written to non-volatile storage. Both the program to perform the reprogramming and the flash ROM to be programmed must reside in this area. Ideally, 32K of this space is allocated to the flash ROM area and 32K is allocated to the code. The code must move itself between the two halves, being able to program a maximum of a 64K byte memory space. A need exists for a means for accessing the entire flash ROM from a 32K window.
"Boot Block": Address Switching
Reprogramming a flash ROM requires that it be completely erased before reprogramming. If reprogramming is interrupted, such as by a power loss, the flash ROM could be left in an erased or partially erased state. If this occurs, the computer will no longer operate after the power is restored because the initial startup code has been erased or corrupted. This problem was solved by a "boot block" function.
The "boot block" function includes a small section of the flash ROM which is unalterable once programmed by the manufacturer. This "boot block code" contains a startup program which checks the integrity of the remainder of the ROM, then reprograms the corrupted portion of the ROM from a disk.
The boot block area is initially located where the CPU begins executing code, at the highest location of the ROM. Once the integrity test is complete, a typical system remaps the ROM by inverting the highest address bit to the ROM, since it is considered undesireable for the integrity test code to be taking up this prime location in the memory map. Since the "boot block" code resides in the ROM where the system BIOS is generally found, the BIOS replaces the boot block code via an "Address Line Inversion".
The "Address Line Inversion" is performed by inverting the highest address bit (MSB) to the ROM, switching the upper and lower halves. The address bit that must be flipped is different for different size ROMs. For 1 Mbit ROMs A16 is flipped, 2 Mbit ROMs A17 is flipped, and 4 Mbit ROMs A18 is flipped. According to the prior art, the control functions are built into the core logic, and are specific to a particular size ROM. A need exists in the prior art for a versatile method of selectively inverting the highest address line from the processor which is used by the ROM (e.g., flash ROM).